package com.xin.di.uav.applet.controller;

import com.xin.di.uav.applet.resp.GoodsResponse;
import com.xin.di.uav.applet.service.HomePageService;
import com.xin.di.uav.common.utils.Rs;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/home/home-page/")
@RequiredArgsConstructor
@Tag(name = "首页接口", description = "首页接口")
public class CommonHomePageController {

    @Autowired
    private HomePageService homePageService;

    @Tag(name = "商品", description = "商品")
    @GetMapping("goods")
    public Rs<GoodsResponse> goods(@RequestParam String placementPointId) {
        return Rs.success(homePageService.goods(placementPointId));
    }


}
